<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>

<html>

<body>
<f:view>
	<f:loadBundle basename="messages" var="msg" />
	<h:form>

		<style>
			.col,.col2 {
				width: 50%;
				vertical-align: top;
			}
		</style>


		<h:panelGrid columns="2" width="100%" columnClasses="col1,col2">

			<rich:tree style="width:300px"
				nodeSelectListener="#{simpleTreeBean.processSelection}"
				reRender="selectedNode" ajaxSubmitSelection="true"
				switchType="client" value="#{simpleTreeBean.treeNode}" var="item"
				ajaxKeys="#{null}">
			</rich:tree>

			<h:outputText escape="false"
				value="Selected Node: #{simpleTreeBean.nodeTitle}" id="selectedNode" />

		</h:panelGrid>

	</h:form>
</f:view>
</body>
</html>